package com.yhn.bubblevideo.model.dto.req.user;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户注册请求体
 *
 * @author yhn
 * @version 1.0
 * @description
 * @date 2024/9/21 9:30
 */
@Data
public class UserRegisterRequestDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 3191241716373120793L;
    @NotBlank(message = "账号不能为空")
    @Size(min = 2, max = 16, message = "昵称长度在2-16位")
    private String nickname;

    @NotBlank(message = "密码不能为空")
    @Size(min = 8, max = 20, message = "密码长度在8-20位")
    private String password;

    @NotBlank(message = "重复密码不能为空")
    @Size(min = 8, max = 20, message = "重复密码长度在8-20位")
    private String checkPassword;

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    @NotBlank(message = "邮箱验证码不能为空")
    @Size(min = 6, max = 6, message = "邮箱验证码长度为6位")
    private String code;
}
